package com.itheima.springboottest;

import com.itheima.springboottest.pojo.Clazz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

// 添加处理器类注解
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private HelloService helloService;
    // 定义处理器类方法，添加处理器方法注解

    public String hello() {
       String  result=helloService.hello();
       return  result;
    }
    @GetMapping("/get")
    public List<Clazz> get(){
        List<Clazz> result=helloService.get();
        return result;
    }


    @GetMapping("/520zhoutong")
    public String get2(){

        return helloService.get2();
    }
}
